<!--_meta 作为公共模版分离出去-->
{include file="common/_meta" /}
<title>基本设置</title>
<meta name="keywords" content="李志立，lizhilimaster@163.com">
<meta name="description" content="李志立，lizhilimaster@163.com">
</head>
<body>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 系统管理 <span class="c-gray en">&gt;</span>
		SEO优化 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);"
		 title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			<div class="Huialert Huialert-danger"><i class="Hui-iconfont">&#xe6a6;</i>
			目前只有百度支持api推送，请去百度站长申请token,填写后进行推送。其他平台，请打开各个平台工具，然后点击下方的xml地图或者生成链接，通过各自网站后台进行提交！！<b>注意：这个只是减少推送过程，不能代替本身的seo.</b>
			</div>
			<form action="" method="post" class="form form-horizontal" enctype="multipart/form-data" id="form-article-add">


				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<h3>百度提交</h3>
					</label>
					<div class="formControls col-xs-8 col-sm-9" style="text-align: left;line-height: 50px;padding-top: 10px;font-size: 20px">
						百度站长登陆地址：<a style="color: red" href="https://ziyuan.baidu.com/" target="_blank">https://ziyuan.baidu.com/</a> <br>
						修改百度token：<input type="text" value="{$baidu_token}" id="baidu_token" class="input-text radius size-M" style="width: 50%">
						<button id="xiu_baidu" class="btn btn-primary radius">修改token</button>
						<button id="ti_baidu" class="btn btn-success radius">提交到百度</button>
					</div>
				</div>

				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<h3>360提交</h3>
					</label>
					<div class="formControls col-xs-8 col-sm-9" style="text-align: left;line-height: 50px;padding-top: 10px;font-size: 20px">
						360站长登陆地址：<a style="color: red" href="https://zhanzhang.so.com/" target="_blank">https://zhanzhang.so.com/</a>
					</div>
				</div>

				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<h3>搜狗提交</h3>
					</label>
					<div class="formControls col-xs-8 col-sm-9" style="text-align: left;line-height: 50px;padding-top: 10px;font-size: 20px">
						搜狗站长登陆地址：<a style="color: red" href="https://zhanzhang.sogou.com/" target="_blank">https://zhanzhang.sogou.com/</a>
					</div>
				</div>


				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<h3>神马提交</h3>
					</label>
					<div class="formControls col-xs-8 col-sm-9" style="text-align: left;line-height: 50px;padding-top: 10px;font-size: 20px">
						神马站长登陆地址：<a style="color: red" href="https://zhanzhang.sm.cn/" target="_blank">https://zhanzhang.sm.cn/</a>
					</div>
				</div>

				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<h3>头条提交</h3>
					</label>
					<div class="formControls col-xs-8 col-sm-9" style="text-align: left;line-height: 50px;padding-top: 10px;font-size: 20px">
						头条站长登陆地址：<a style="color: red" href="https://zhanzhang.toutiao.com/" target="_blank">https://zhanzhang.toutiao.com/</a>
					</div>
				</div>


				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<h3>综合使用</h3>
					</label>
					<div class="formControls col-xs-8 col-sm-9" style="text-align: left;line-height: 50px;padding-top: 10px;">
						地图网站为：{$sitemap} <a style="margin-left:25px;color: #31B0D5;font-size: 20px;" target="_blank" href="/sitemap.xml">查看地图</a>
					</div>
				</div>
				
				
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
					</label>
					<div class="formControls col-xs-8 col-sm-9" style="text-align: left;line-height: 50px;padding-top: 10px;">
						<input type="number" placeholder="填写生成数量（不包括目录），生成网站目录和最新的数据" value="" id="num" class="input-text radius size-M" style="width: 60%">
						<button id="num_sheng" class="btn btn-secondary radius">生成网站链接</button>
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
					</label>
					<div id="nei" class="formControls col-xs-8 col-sm-9" style="text-align: left;line-height: 50px;padding-top: 10px;">

					</div>
				</div>
			</form>
		</article>
	</div>
	<!--_footer 作为公共模版分离出去-->
	{include file="common/_footer" /}
	<script type="text/javascript">
		$(function() {
			$('.skin-minimal input').iCheck({
				checkboxClass: 'icheckbox-blue',
				radioClass: 'iradio-blue',
				increaseArea: '20%'
			});

		});
		$('#num_sheng').click(function (event){
			event.stopPropagation();    //  阻止事件冒泡
			event.preventDefault();
			let num1=$('#num').val();
			if(!num1){
				alert('不能为空');
				return false;
			}

			layer.confirm('确认要生成？', function(index) {
				$.post(
					"{:url('map/ajax')}", {
						type: 'xiu_num',
						num:num1
					},
					function(result) {
						if (result.code === 0) {
							layer.msg('生成失败失败!', {
								icon: 5,
								time: 1000
							});
						} else if (result.code === 1) {
							layer.msg('生成成功!', {
								icon: 1,
								time: 1000
							});
							let html=''
							for(let v of result.data){
								html+='<span>'+v+'</span><br>';
							}
							$('#nei').html(html)
						}
					});
			});
			return
		})
		$('#xiu_baidu').click(function (event){
			event.stopPropagation();    //  阻止事件冒泡
			event.preventDefault();
			let token=$('#baidu_token').val().replace(/\s*/g,"");
			if(!token){
				alert('请填写百度token后提交！');
				return false;
			}

			layer.confirm('确认要修改token吗？', function(index) {
				$.post(
					"{:url('map/ajax')}", {
						token: token,
						type: 'xiu_baidu',
					},
					function(result) {
						if (result === 0) {
							layer.msg('修改失败!', {
								icon: 5,
								time: 1000
							});
						} else if (result === 1) {
							layer.msg('修改成功!', {
								icon: 1,
								time: 1000
							});
						}
					});
			});
			return
		})
		$('#ti_baidu').click(function (event){
			event.stopPropagation();    //  阻止事件冒泡
			event.preventDefault();
			layer.confirm('确认要提交到百度吗？', function(index) {
				$.post(
					"{:url('map/ajax')}", {
						type: 'ti_baidu',
					},
					function(result) {
						if (result.code === 0) {
							layer.msg('提交失败!原因：'+result.message, {
								icon: 5,
								time: 1000
							});
						} else if (result.code === 1) {
							layer.msg('提交成功!', {
								icon: 1,
								time: 1000
							});
						}
					});
			});
			return
		})

	</script>
</body>
</html>
